local FightInterface = require("gameLogic.fightSkill.sequence.FightInterface")
local FightTimeMove = class("FightTimeMove", FightInterface)
local FightConst = require("const.FightConst")

function FightTimeMove:ctor(actor, tarActor)
    self._actor = actor
    self._tarActor = tarActor
    FightTimeMove.super.ctor(self)
end

function FightTimeMove:_update()
    if self._sequence then
        return
    end
    self._sequence = DOTween.Sequence()
    local tarPos = self._tarActor.transform.position
    tarPos.z = tarPos.z + FightConst.Z_RATIO[self._actor:getCamp()]
    self._actor.transform:DOMove(tarPos, 0.5)
    self._actor:setMoving(true)
    self._sequence:Append(move)
    self._sequence:AppendCallback(
        function()
            self._actor:setMoving(false)
            self._isDone = true
        end
    )
end

return FightTimeMove
